package com.iot08.common.entity.admin;

import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@Document("channel_area")
public class ChannelArea implements Serializable {
    private static final long serialVersionUID = 1L;

    @Field("_id")
    private String id;

    //名称
    private String name;

    //关联渠道id
    @Field("channel_code")
    private Long channelCode;

    //顶级id
    private String tid;

    //上级id
    private String pid;

    //级别，1=一级 。。。 5=五级
    private Integer level;

    private Integer deleted;

    private String creator;

    @Field("create_time")
    private Date createTime;

    @Field("update_time")
    private Date updateTime;

    @Transient
    private String pname;

    @Transient
    private List<ChannelArea> channelAreaList = new ArrayList<>();
}
